ADIR
DIR

Syntax: ADIR [#channel,] device    (ATARIDOS)
   and: DIR [#channel,] device     (QL ROM)
    or: DIR [#channel,] [device]   (Toolkit II)
    or: DIR \file [,device]        (Toolkit II)
Location: QL ROM, Toolkit II (DIR) and ATARIDOS (ADIR)

DIR produces a listing to the specified channel (default #1) of all of the files contained on the given device. The listing gives the name of the device (specified with FORMAT) followed by the number of available sectors/the number of usable sectors; followed by a list of the files in the order they appear on the disk.

If you try to get a directory of a ram disk, eg. DIR RAM1_ then the name of the device shown on screen will be RAM1.

If Toolkit II is present, and #channel is a window, a <CTRL><F5> keystroke (pausing output) is generated at the end of each screen full of the listing.  You can however also use the third syntax to output the directory to the specified file.  If file already exists, you will be given the option of overwriting it.  If file doesn't include a device name, the data default directory is used.

The Toolkit II variant also supports the default data directory, which will be used if no device name is given in device, or if the specified device name would result in the error 'Not Found'.

If you have Level-2 or Level-3 device drivers, and there are any sub-directories (created with MAKE_DIR) in the given directory, then if you have Toolkit II present, the names of these sub-directories will appear with the suffix ->. You can then list the contents of these sub-directories by using DIR with the original device name plus the name of the sub-directory.

Level-3 drivers take this one step further in that after the name of the disk in the specified device, appears details of the type of disk being read, ie. MS-DOS or QDOS followed by SD, DD, HD or ED to confirm whether the disk is Single Density, Double Density, High Density or Extra Density.  RAM disks are listed as QDOS SD.

Example:
If Level-2 device drivers are present, DIR flp1_ might produce the following:

PSION DISK
1000/2880 sectors
QUILL ->
ARCHIVE ->

CROSS-REFERENCE:
DATA_USE sets the current data default directory, MAKE_DIR creates sub-directories, WDIR allows wildcard names.
Other commands added by ATARIDOS are ASTAT, ADELETE, ACOPY and AFORMAT.
